package com.cust.cow.service.impl;

import com.cust.cow.common.Result;
import com.cust.cow.mapper.QuarantineLogMapper;
import com.cust.cow.service.QuarantineLog;
import com.cust.cow.pojo.quarantineLog;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class QuarantineLogImpl implements QuarantineLog {
    @Autowired
    QuarantineLogMapper quarantineLogMapper;
    @Override
    public List<quarantineLog> findQuarantineLogAll() {
        return quarantineLogMapper.findQuarantineLogAll();
    }

    @Override
    public Result insertQuarantineLog(quarantineLog quarantineLog) {
        quarantineLogMapper.insertQuarantineLog(quarantineLog);
        return new Result(200, "success");
    }

    @Override
    public Result deleteQuarantineLog(Integer cattleId) {
        quarantineLogMapper.deleteQuarantineLog(cattleId);
        return new Result(200, "success");
    }
}
